Main Tab 1

Column

Column Tab 1

# A tibble: 301 × 10
    S.NO Name        Natio…¹ Curre…² Previ…³ Sport  Year earni…⁴ earni…⁵ earni…⁶
   <dbl> <chr>       <chr>     <dbl> <chr>   <chr> <dbl>   <dbl>   <dbl> <chr>  
 1     1 Mike Tyson  USA           1 <NA>    Boxi…  1990    28.6    28.6 20-30  
 2     2 Buster Dou… USA           2 <NA>    Boxi…  1990    26      26   20-30  
 3     3 Sugar Ray … USA           3 <NA>    Boxi…  1990    13      13   0-20   
 4     4 Ayrton Sen… Brazil        4 <NA>    Raci…  1990    10      10   0-20   
 5     5 Alain Prost France        5 <NA>    Raci…  1990     9       9   0-20   
 6     6 Jack Nickl… USA           6 <NA>    Golf   1990     8.6     8.6 0-20   
 7     7 Greg Norman Austra…       7 <NA>    Golf   1990     8.5     8.5 0-20   
 8     8 Michael Jo… USA           8 <NA>    NBA    1990     8.1     8.1 0-20   
 9     9 Arnold Pal… USA           8 <NA>    Golf   1990     8.1     8.1 0-20   
10    10 Evander Ho… USA           8 <NA>    Boxi…  1990     8.1     8.1 0-20   
# … with 291 more rows, and abbreviated variable names ¹​Nationality,
#   ²​`Current Rank`, ³​`Previous Year Rank`, ⁴​`earnings ($ million)`, ⁵​earnings,
#   ⁶​earnings2

Column Tab 2

S.NO Name Nationality Current Rank Previous Year Rank Sport Year earnings ($ million) earnings earnings2
1 Mike Tyson USA 1 NA Boxing 1990 28.6 28.6 20-30
2 Buster Douglas USA 2 NA Boxing 1990 26.0 26.0 20-30
3 Sugar Ray Leonard USA 3 NA Boxing 1990 13.0 13.0 0-20
4 Ayrton Senna Brazil 4 NA Racing 1990 10.0 10.0 0-20
5 Alain Prost France 5 NA Racing 1990 9.0 9.0 0-20
6 Jack Nicklaus USA 6 NA Golf 1990 8.6 8.6 0-20
7 Greg Norman Australia 7 NA Golf 1990 8.5 8.5 0-20
8 Michael Jordan USA 8 NA NBA 1990 8.1 8.1 0-20
9 Arnold Palmer USA 8 NA Golf 1990 8.1 8.1 0-20
10 Evander Holyfield USA 8 NA Boxing 1990 8.1 8.1 0-20
11 Evander Holyfield USA 1 8 Boxing 1991 60.5 60.5 60+
12 Mike Tyson USA 2 1 Boxing 1991 31.5 31.5 30-40
13 Michael Jordan USA 3 8 NBA 1991 16.0 16.0 0-20
14 George Foreman USA 4 >30 Boxing 1991 14.5 14.5 0-20
15 Ayrton Senna Brazil 5 4 Racing 1991 13.0 13.0 0-20
16 Alain Prost France 6 5 Racing 1991 11.0 11.0 0-20
17 Donovan “Razor” Ruddock Canada 7 >30 Boxing 1991 10.2 10.2 0-20
18 Arnold Palmer USA 8 8 Golf 1991 9.3 9.3 0-20
19 Nigel Mansell UK 9 12 Racing 1991 9.0 9.0 0-20
20 Sugar Ray Leonard USA 10 6 Golf 1991 8.5 8.5 0-20
21 Michael Jordan USA 1 3 NBA 1992 35.9 35.9 30-40
22 Evander Holyfield USA 2 1 Boxing 1992 28.0 28.0 20-30
23 Ayrton Senna Brazil 3 5 Racing 1992 22.0 22.0 20-30
24 Nigel Mansell UK 4 9 Racing 1992 14.5 14.5 0-20
25 Arnold Palmer USA 5 8 Golf 1992 11.1 11.1 0-20
26 Andre Agassi USA 6 17 Tennis 1992 11.0 11.0 0-20
27 Joe Montana USA 7 13 NFL 1992 9.5 9.5 0-20
28 Sugar Ray Leonard USA 8 10 Golf 1992 9.2 9.2 0-20
29 Jim Courier USA 9 >40 Tennis 1992 9.0 9.0 0-20
30 Monica Seles USA 10 12 Tennis 1992 8.5 8.5 0-20
31 Michael Jordan USA 1 1 NBA 1993 36.0 36.0 30-40
32 Riddick Bowe USA 2 >40 Boxing 1993 25.0 25.0 20-30
33 Ayrton Senna Brazil 3 3 Racing 1993 18.5 18.5 0-20
34 Alain Prost France 4 >40 Racing 1993 16.0 16.0 0-20
35 George Foreman USA 5 19 Boxing 1993 15.8 15.8 0-20
36 Shaquille O’Neal USA 6 >40 NBA 1993 15.2 15.2 0-20
37 Lennox Lewis USA 7 >40 Boxing 1993 15.0 15.0 0-20
38 Cecil Fielder USA 8 40 MLB 1993 12.7 12.7 0-20
39 Jim Courier USA 9 9 Tennis 1993 12.6 12.6 0-20
40 Joe Montana USA 10 7 NFL 1993 11.5 11.5 0-20
41 Michael Jordan USA 1 1 NBA 1994 30.0 30.0 20-30
42 Shaq O’Neal USA 2 6 NBA 1994 16.7 16.7 0-20
43 Jack Nicklaus USA 3 13 Golf 1994 14.8 14.8 0-20
44 Arnold Palmer USA 4 11 Golf 1994 13.6 13.6 0-20
45 Gerhard Berger Austria 5 30 Racing 1994 13.5 13.5 0-20
46 Wayne Gretzky Canada 5 22 NHL 1994 13.5 13.5 0-20
47 Michael Moorer USA 7 >40 Boxing 1994 12.1 12.1 0-20
48 Evander Holyfield USA 8 12 Boxing 1994 12.0 12.0 0-20
49 Andre Agassi USA 9 20 Tennis 1994 11.4 11.4 0-20
50 Nigel Mansell UK 10 19 Racing 1994 11.3 11.3 0-20
51 Michael Jordan USA 1 1 NBA 1995 43.9 43.9 40-60
52 Mike Tyson USA 2 not ranked Boxing 1995 40.0 40.0 30-40
53 Deion Sanders USA 3 38 NFL 1995 22.5 22.5 20-30
54 Riddick Bowe USA 4 not ranked Boxing 1995 22.2 22.2 20-30
55 Shaquille O’Neal USA 5 2 NBA 1995 21.9 21.9 20-30
56 George Foreman USA 6 15 Boxing 1995 18.0 18.0 0-20
57 Andre Agassi USA 7 9 Tennis 1995 16.0 16.0 0-20
58 Sugar Ray Leonard USA 8 3 Golf 1995 15.1 15.1 0-20
59 Michael Schumacher Germany 9 30 Racing 1995 15.0 15.0 0-20
60 Wayne Gretzky Canada 10 5 NHL 1995 14.5 14.5 0-20
61 Mike Tyson USA 1 2 Boxing 1996 75.0 75.0 60+
62 Michael Jordan USA 2 1 NBA 1996 52.6 52.6 40-60
63 Michael Schumacher Germany 3 9 Racing 1996 33.0 33.0 30-40
64 Shaquille O’Neal USA 4 5 NBA 1996 24.4 24.4 20-30
65 Emmit Smith USA 5 not ranked NFL 1996 16.5 16.5 0-20
66 Evander Holyfield USA 6 14 Boxing 1996 15.5 15.5 0-20
67 Andre Agassi USA 7 7 Tennis 1996 15.2 15.2 0-20
68 Arnold Palmer USA 8 11 Golf 1996 15.1 15.1 0-20
69 Dennis Rodman USA 9 not ranked NBA 1996 12.9 12.9 0-20
70 Patrick Ewing USA 9 19 NBA 1996 12.9 12.9 0-20
71 Michael Jordan USA 1 2 NBA 1997 78.3 78.3 60+
72 Evander Holyfield USA 2 6 Boxing 1997 54.3 54.3 40-60
73 Oscar De La Hoya USA 3 17 Boxing 1997 38.0 38.0 30-40
74 Michael Schumacher Germany 4 3 Racing 1997 35.0 35.0 30-40
75 Mike Tyson USA 5 1 Boxing 1997 27.0 27.0 20-30
76 Tiger Woods USA 6 26 Golf 1997 26.1 26.1 20-30
77 Shaquille O’Neal USA 7 4 NBA 1997 25.4 25.4 20-30
78 Dale Earnhardt USA 8 20 Racing 1997 19.1 19.1 0-20
79 Joe Sakic Canada 9 none NHL 1997 17.9 17.9 0-20
80 Grant Hill USA 10 18 NBA 1997 17.0 17.0 0-20
81 Michael Jordan USA 1 NA NBA 1998 69.0 69.0 60+
82 Michael Schumacher Germany 2 NA Racing 1998 38.0 38.0 30-40
83 Sergei Federov Russia 3 NA NHL 1998 29.8 29.8 20-30
84 Tiger Woods USA 4 NA Golf 1998 26.8 26.8 20-30
85 Dale Earnhardt USA 5 NA Racing 1998 24.1 24.1 20-30
86 Grant Hill USA 6 NA NBA 1998 21.6 21.6 20-30
87 Oscar De La Hoya USA 7 NA Boxing 1998 18.5 18.5 0-20
88 Patrick Ewing USA 8 NA NBA 1998 18.3 18.3 0-20
89 Arnold Palmer USA 9 NA Golf 1998 18.1 18.1 0-20
90 Gary Sheffield USA 10 NA MLB 1998 17.2 17.2 0-20
91 Michael Schumacher Germany 1 2 Racing 1999 49.0 49.0 40-60
92 Tiger Woods USA 2 4 Golf 1999 47.0 47.0 40-60
93 Oscar De La Hoya USA 3 7 Boxing 1999 43.5 43.5 40-60
94 Michael Jordan USA 4 1 NBA 1999 40.0 40.0 30-40
95 Evander Holyfield USA 5 >10 Boxing 1999 35.5 35.5 30-40
96 Mike Tyson USA 6 >10 Boxing 1999 33.0 33.0 30-40
97 Shaq O’Neal USA 7 >10 NBA 1999 31.0 31.0 30-40
98 Lennox Lewis USA 8 >10 Boxing 1999 29.0 29.0 20-30
99 Dale Earnhardt USA 9 5 Racing 1999 26.5 26.5 20-30
100 Grant Hill USA 10 6 NBA 1999 23.0 23.0 20-30
101 Michael Schumacher Germany 1 1 Racing 2000 59.0 59.0 40-60
102 Tiger Woods USA 2 2 Golf 2000 53.0 53.0 40-60
103 Mike Tyson USA 3 6 Boxing 2000 48.0 48.0 40-60
104 Michael Jordan USA 4 4 NBA 2000 37.0 37.0 30-40
105 Grant Hill USA 5 10 NBA 2000 26.0 26.0 20-30
106 Dale Earnhardt USA 6 9 Racing 2000 24.5 24.5 20-30
107 Shaq O’Neal USA 7 7 NBA 2000 24.0 24.0 20-30
108 Lennox Lewis USA 8 8 Boxing 2000 23.0 23.0 20-30
109 Oscar De La Hoya USA 9 3 Boxing 2000 23.0 23.0 20-30
110 Kevin Garnett USA 10 >10 NBA 2000 21.0 21.0 20-30
111 Tiger Woods USA 1 2 Golf 2002 69.0 69.0 60+
112 Michael Schumacher Germany 2 1 Racing 2002 67.0 67.0 60+
113 Michael Jordan USA 3 4 NBA 2002 36.0 36.0 30-40
114 Lennox Lewis USA 4 8 Boxing 2002 28.0 28.0 20-30
115 Grant Hill USA 5 5 NBA 2002 24.0 24.0 20-30
116 Shaquille O’Neal USA 5 7 NBA 2002 24.0 24.0 20-30
117 Mike Tyson USA 7 3 Boxing 2002 23.0 23.0 20-30
118 Kevin Garnett USA 7 10 NBA 2002 23.0 23.0 20-30
119 Kobe Bryant USA 9 >10 NBA 2002 22.0 22.0 20-30
120 Jacques Villeneuve Canada 10 >10 Racing 2002 20.0 20.0 0-20
121 Jeff Gordon USA 10 >10 Racing 2002 20.0 20.0 0-20
122 Tiger Woods USA 1 1 Golf 2003 78.0 78.0 60+
123 Michael Schumacher Germany 2 2 Racing 2003 75.0 75.0 60+
124 Michael Jordan USA 3 3 NBA 2003 35.0 35.0 30-40
125 Shaq O’Neal USA 4 5 NBA 2003 30.5 30.5 30-40
126 Oscar De La Hoya USA 5 >10 Boxing 2003 30.0 30.0 20-30
127 Kevin Garnett USA 6 7 NBA 2003 28.0 28.0 20-30
128 Alex Rodriguez USA 7 >10 MLB 2003 26.0 26.0 20-30
129 Grant Hill USA 8 5 NBA 2003 25.5 25.5 20-30
130 Andre Agassi USA 9 >10 Tennis 2003 24.0 24.0 20-30
131 Jacques Villeneuve Canada 10 10 Racing 2003 23.0 23.0 20-30
132 Tiger Woods USA 1 1 Golf 2004 80.3 80.3 60+
133 Michael Schumacher Germany 2 2 Racing 2004 80.0 80.0 60+
134 Peyton Manning USA 3 >10 NFL 2004 42.0 42.0 40-60
135 Michael Jordan USA 4 3 NBA 2004 35.0 35.0 30-40
136 Shaquille O’Neal USA 5 4 NBA 2004 31.9 31.9 30-40
137 Kevin Garnett USA 6 6 NBA 2004 29.7 29.7 20-30
138 Andre Agassi USA 7 9 Tennis 2004 28.2 28.2 20-30
139 David Beckham UK 8 >10 Soccer 2004 28.0 28.0 20-30
140 Alex Rodriguez USA 9 7 MLB 2004 26.2 26.2 20-30
141 Kobe Bryant USA 10 >10 NBA 2004 26.1 26.1 20-30
142 Tiger Woods USA 1 1 Golf 2005 87.0 87.0 60+
143 Michael Schumacher Germany 2 2 Racing 2005 60.0 60.0 40-60
144 Oscar De La Hoya USA 3 >10 Boxing 2005 38.0 38.0 30-40
145 Michael Vick USA 4 >10 NFL 2005 37.5 37.5 30-40
146 Shaquille O’Neal USA 5 5 NBA 2005 33.4 33.4 30-40
147 Michael Jordan USA 6 4 NBA 2005 33.0 33.0 30-40
148 David Beckham UK 7 8 Soccer 2005 32.5 32.5 30-40
149 Kobe Bryant USA 8 10 NBA 2005 28.8 28.8 20-30
150 Lance Armstrong USA 9 >10 Racing 2005 28.0 28.0 20-30
151 Valentino Rossi Italy 9 >10 Racing 2005 28.0 28.0 20-30
152 Tiger Woods USA 1 1 Golf 2006 90.0 90.0 60+
153 Michael Schumacher Germany 2 2 Racing 2006 58.0 58.0 40-60
154 Muhammad Ali USA 3 >10 Boxing 2006 55.0 55.0 40-60
155 Phil Mickelson USA 4 >10 Golf 2006 47.0 47.0 40-60
156 Michael Jordan USA 5 6 NBA 2006 32.0 32.0 30-40
157 Kobe Bryant USA 6 8 NBA 2006 31.0 31.0 30-40
158 Shaquille O’Neal USA 7 5 NBA 2006 30.0 30.0 20-30
159 Valentino Rossi Italy 8 9 Racing 2006 30.0 30.0 20-30
160 Alex Rodriguez USA 9 >10 MLB 2006 29.0 29.0 20-30
161 Tom Brady USA 9 >10 NFL 2006 29.0 29.0 20-30
162 Tiger Woods USA 1 1 Golf 2007 100.0 100.0 60+
163 Oscar De La Hoya USA 2 >10 Boxing 2007 43.0 43.0 40-60
164 Phil Mickelson USA 3 4 Golf 2007 42.0 42.0 40-60
165 Kimi Raikkonen Finland 4 >10 Racing 2007 40.0 40.0 30-40
166 Michael Schumacher Germany 5 2 Racing 2007 36.0 36.0 30-40
167 David Beckham UK 6 >10 Soccer 2007 33.0 33.0 30-40
168 Kobe Bryant USA 6 >10 NBA 2007 33.0 33.0 30-40
169 Shaquille O’Neal USA 8 7 NBA 2007 32.0 32.0 30-40
170 Ronaldinho Brazil 9 >10 Soccer 2007 31.0 31.0 30-40
171 Michael Jordan USA 9 5 NBA 2007 31.0 31.0 30-40
172 Tiger Woods USA 1 1 Golf 2008 115.0 115.0 60+
173 David Beckham UK 2 6 Soccer 2008 50.0 50.0 40-60
174 Michael Jordan USA 3 9 NBA 2008 45.0 45.0 40-60
175 Phil Mickelson USA 3 3 Golf 2008 45.0 45.0 40-60
176 Kimi Raikkonen Finland 5 4 Racing 2008 44.0 44.0 40-60
177 Kobe Bryant USA 6 7 NBA 2008 39.0 39.0 30-40
178 LeBron James USA 7 >10 NBA 2008 38.0 38.0 30-40
179 Ronaldinho Brazil 8 9 Soccer 2008 37.0 37.0 30-40
180 Valentino Rossi Italy 9 >10 Racing 2008 35.0 35.0 30-40
181 Roger Federer Switzerland 9 >10 Tennis 2008 35.0 35.0 30-40
182 Tiger Woods USA 1 1 Golf 2009 110.0 110.0 60+
183 Kobe Bryant USA 2 6 NBA 2009 45.0 45.0 40-60
184 Michael Jordan USA 2 3 NBA 2009 45.0 45.0 40-60
185 Kimi Raikkonen Finland 2 5 Racing 2009 45.0 45.0 40-60
186 David Beckham UK 5 2 Soccer 2009 42.0 42.0 40-60
187 LeBron James USA 6 7 NBA 2009 40.0 40.0 30-40
188 Phil Mickelson USA 6 3 Golf 2009 40.0 40.0 30-40
189 Manny Pacquiao Philippines 6 >10 Boxing 2009 40.0 40.0 30-40
190 Valentino Rossi Italy 9 9 Racing 2009 35.0 35.0 30-40
191 Dale Earnhardt Jr. USA 10 >10 Racing 2009 34.0 34.0 30-40
192 Tiger Woods USA 1 1 Golf 2010 105.0 105.0 60+
193 Floyd Mayweather USA 2 >10 Boxing 2010 65.0 65.0 60+
194 Kobe Bryant USA 3 2 NBA 2010 48.0 48.0 40-60
195 Phil Mickelson USA 4 6 Golf 2010 46.0 46.0 40-60
196 David Beckham UK 5 5 Soccer 2010 43.7 43.7 40-60
197 Roger Federer Switzerland 6 >10 Tennis 2010 43.0 43.0 40-60
198 LeBron James USA 7 6 NBA 2010 42.8 42.8 40-60
199 Manny Pacquiao Philippines 8 6 Boxing 2010 42.0 42.0 40-60
200 Eli Manning USA 9 >10 NFL 2010 39.9 39.9 30-40
201 Terrell Suggs USA 10 >10 NFL 2010 38.3 38.3 30-40
202 Tiger Woods USA 1 1 Golf 2011 75.0 75.0 60+
203 Kobe Bryant USA 2 3 NBA 2011 53.0 53.0 40-60
204 LeBron James USA 3 7 NBA 2011 48.0 48.0 40-60
205 Roger Federer Switzerland 4 6 Tennis 2011 47.0 47.0 40-60
206 Phil Mickelson USA 5 4 Golf 2011 46.5 46.5 40-60
207 David Beckham UK 6 5 Soccer 2011 40.0 40.0 30-40
208 Cristiano Ronaldo Portugal 7 13 Soccer 2011 38.0 38.0 30-40
209 Alex Rodriguez Dominican 8 12 MLB 2011 35.0 35.0 30-40
210 Michael Schumacher Germany 9 >20 Racing 2011 34.0 34.0 30-40
211 Lionel Messi Argentina 10 >20 Soccer 2011 32.3 32.3 30-40
212 Floyd Mayweather USA 1 ? Boxing 2012 85.0 85.0 60+
213 Manny Pacquiao Filipino 2 24 Boxing 2012 62.0 62.0 60+
214 Tiger Woods USA 3 1 Golf 2012 59.4 59.4 40-60
215 LeBron James USA 4 3 NBA 2012 53.0 53.0 40-60
216 Roger Federer Switzerland 5 4 Tennis 2012 52.7 52.7 40-60
217 Kobe Bryant USA 6 2 NBA 2012 52.3 52.3 40-60
218 Phil Mickelson USA 7 5 Golf 2012 47.8 47.8 40-60
219 David Beckham UK 8 6 Soccer 2012 46.0 46.0 40-60
220 Cristiano Ronaldo Portugal 9 21 Soccer 2012 42.5 42.5 40-60
221 Peyton Manning USA 10 7 NFL 2012 42.4 42.4 40-60
222 Tiger Woods USA 1 3 Golf 2013 78.1 78.1 60+
223 Roger Federer Switzerland 2 5 Tennis 2013 71.5 71.5 60+
224 Kobe Bryant USA 3 6 NBA 2013 61.9 61.9 60+
225 LeBron James USA 4 4 NBA 2013 59.8 59.8 40-60
226 Drew Brees USA 5 ? NFL 2013 51.0 51.0 40-60
227 Aaron Rodgers USA 6 ? NFL 2013 49.0 49.0 40-60
228 Phil Mickelson USA 7 7 Golf 2013 48.7 48.7 40-60
229 David Beckham UK 8 8 Soccer 2013 47.2 47.2 40-60
230 Cristiano Ronaldo Portugal 9 9 Soccer 2013 44.0 44.0 40-60
231 Lionel Messi Argentina 10 11 Soccer 2013 41.3 41.3 40-60
232 Floyd Mayweather USA 1 14 Boxing 2014 105.0 105.0 60+
233 Cristiano Ronaldo Portugal 2 9 Soccer 2014 80.0 80.0 60+
234 LeBron James USA 3 4 NBA 2014 72.3 72.3 60+
235 Lionel Messi Argentina 4 10 Soccer 2014 64.7 64.7 60+
236 Kobe Bryant USA 5 3 NBA 2014 61.5 61.5 60+
237 Tiger Woods USA 6 1 Golf 2014 61.2 61.2 60+
238 Roger Federer Switzerland 7 2 Tennis 2014 56.2 56.2 40-60
239 Phil Mickelson USA 8 7 Golf 2014 53.2 53.2 40-60
240 Rafael Nadal Spain 9 >14 Tennis 2014 44.5 44.5 40-60
241 Matt Ryan USA 10 >100 NFL 2014 43.8 43.8 40-60
242 Floyd Mayweather USA 1 1 Boxing 2015 300.0 300.0 60+
243 Manny Pacquiao Philippines 2 11 Boxing 2015 160.0 160.0 60+
244 Cristiano Ronaldo Portugal 3 2 Soccer 2015 79.6 79.6 60+
245 Lionel Messi Argentina 4 4 Soccer 2015 73.8 73.8 60+
246 Roger Federer Switzerland 5 7 Tennis 2015 67.0 67.0 60+
247 LeBron James USA 6 3 NBA 2015 64.8 64.8 60+
248 Kevin Durant USA 7 20 NBA 2015 54.2 54.2 40-60
249 Phil Mickelson USA 8 8 Golf 2015 50.8 50.8 40-60
250 Tiger Woods USA 9 6 Golf 2015 50.6 50.6 40-60
251 Kobe Bryant USA 10 5 NBA 2015 49.5 49.5 40-60
252 Cristiano Ronaldo Portugal 1 3 Soccer 2016 88.0 88.0 60+
253 Lionel Messi Argentina 2 4 Soccer 2016 81.4 81.4 60+
254 LeBron James USA 3 6 NBA 2016 77.2 77.2 60+
255 Roger Federer Switzerland 4 5 Tennis 2016 67.8 67.8 60+
256 Kevin Durant USA 5 7 NBA 2016 56.2 56.2 40-60
257 Novak Djokovic Serbia 6 13 Tennis 2016 55.8 55.8 40-60
258 Cam Newton USA 7 >20 NFL 2016 53.1 53.1 40-60
259 Phil Mickelson USA 8 8 Golf 2016 52.9 52.9 40-60
260 Jordan Spieth USA 9 >20 Golf 2016 52.8 52.8 40-60
261 Kobe Bryant USA 10 10 NBA 2016 50.0 50.0 40-60
262 Cristiano Ronaldo Portugal 1 1 Soccer 2017 93.0 93.0 60+
263 LeBron James USA 2 3 NBA 2017 86.2 86.2 60+
264 Lionel Messi Argentina 3 2 Soccer 2017 80.0 80.0 60+
265 Roger Federer Switzerland 4 4 Tennis 2017 64.0 64.0 60+
266 Kevin Durant USA 5 5 NBA 2017 60.6 60.6 60+
267 Andrew Luck USA 6 NA NFL 2017 50.0 50.0 40-60
268 Rory McIlroy Northern Ireland 6 17 Golf 2017 50.0 50.0 40-60
269 Stephen Curry USA 8 NA NBA 2017 47.3 47.3 40-60
270 James Harden USA 9 NA NBA 2017 46.6 46.6 40-60
271 Lewis Hamilton UK 10 NA Racing 2017 46.0 46.0 40-60
272 Floyd Mayweather USA 1 >100 Boxing 2018 285.0 285.0 60+
273 Lionel Messi Argentina 2 3 Soccer 2018 111.0 111.0 60+
274 Cristiano Ronaldo Portugal 3 1 Soccer 2018 108.0 108.0 60+
275 Conor McGregor Ireland 4 24 MMA 2018 99.0 99.0 60+
276 Neymar Brazil 5 18 Soccer 2018 90.0 90.0 60+
277 LeBron James USA 6 2 NBA 2018 85.5 85.5 60+
278 Roger Federer Switzerland 7 4 Tennis 2018 77.2 77.2 60+
279 Stephen Curry USA 8 8 NBA 2018 76.9 76.9 60+
280 Matt Ryan USA 9 >100 NFL 2018 67.3 67.3 60+
281 Matthew Stafford USA 10 >100 NFL 2018 59.5 59.5 40-60
282 Lionel Messi Argentina 1 2 Soccer 2019 127.0 127.0 60+
283 Cristiano Ronaldo Portugal 2 3 Soccer 2019 109.0 109.0 60+
284 Neymar Brazil 3 5 Soccer 2019 105.0 105.0 60+
285 Canelo Alvarez Mexico 4 15 Boxing 2019 94.0 94.0 60+
286 Roger Federer Switzerland 5 7 Tennis 2019 93.4 93.4 60+
287 Russell Wilson USA 6 ?? NFL 2019 89.5 89.5 60+
288 Aaron Rogers USA 7 ?? NFL 2019 89.3 89.3 60+
289 LeBron James USA 8 6 NBA 2019 89.0 89.0 60+
290 Stephen Curry USA 9 8 NBA 2019 79.8 79.8 60+
291 Kevin Durant USA 10 11 NBA 2019 65.4 65.4 60+
292 Roger Federer Switzerland 1 5 Tennis 2020 106.3 106.3 60+
293 Cristiano Ronaldo Portugal 2 2 Soccer 2020 105.0 105.0 60+
294 Lionel Messi Argentina 3 1 Soccer 2020 104.0 104.0 60+
295 Neymar Brazil 4 3 Soccer 2020 95.5 95.5 60+
296 LeBron James USA 5 8 NBA 2020 88.2 88.2 60+
297 Stephen Curry USA 6 9 NBA 2020 74.4 74.4 60+
298 Kevin Durant USA 7 10 NBA 2020 63.9 63.9 60+
299 Tiger Woods USA 8 11 Golf 2020 62.3 62.3 60+
300 Kirk Cousins USA 9 >100 NFL 2020 60.5 60.5 60+
301 Carson Wentz USA 10 >100 NFL 2020 59.1 59.1 40-60

Column Tab 3

Column

Row 1

Main Tab 2

Column

1. Plotly for R

Plotly is an R package for creating interactive web-based graphs via plotly’s JavaScript graphing library, plotly.js.

The plotly R package serializes ggplot2 figures into Plotly’s universal graph JSON. plotly::ggplotly will crawl the ggplot2 figure, extract and translate all of the attributes of the ggplot2 figure into JSON (the colors, the axes, the chart type, etc), and draw the graph with plotly.js. Furthermore, you have the option of manipulating the Plotly object with the style function.

2. Cutomizing the Layout

Since the ggplotly() function returns a plotly object, we can manipulate that object in the same way that we would manipulate any other plotly object. A simple and useful application of this is to specify interaction modes, like plotly.js’ layout.dragmode for specifying the mode of click+drag events.

main tab 3

Column

main tab 4

Column

---
title: "Q2"
output: 
  flexdashboard::flex_dashboard:
    orientation: columns
    vertical_layout: fill
    source_code: embed
    social: menu
---
```{r setup, include=FALSE}
library(flexdashboard)
library(tidyverse)
library(plotly)
library(knitr)
library(DT)
df <- read_csv("C:\\Users\\student\\OneDrive - Bryant University\\Desktop\\R\\Col7by11.github.io\\Forbes Richest Atheletes (Forbes Richest Athletes 1990-2020).csv")

# Create a ggplot object
d1 <- df %>%  mutate(earnings =`earnings ($ million)`)

p <- d1 %>% 
  ggplot()+ 
  geom_histogram(mapping=aes(x=earnings))

d1$earnings2 <-  case_when(d1$earnings<=20 ~'0-20', ((d1$earnings>20) & (d1$earnings <= 30))~'20-30', ((d1$earnings>30) & (d1$earnings<=40))~'30-40',  ((d1$earnings>40) & (d1$earnings<=60))~'40-60',TRUE~'60+') 

p1 <- d1 %>% 
  ggplot()+ 
  geom_bar(mapping=aes(x=Sport, fill=earnings2))

p2 <- d1 %>% 
   filter(Nationality=="USA") %>% 
  ggplot()+
 geom_bar(mapping=aes(x=Sport))
  
p3 <- d1 %>% 
  filter(Nationality=="Brazil"|Nationality=="UK") %>% 
  ggplot()+
 geom_bar(mapping=aes(x=Sport,fill=Nationality),position="dodge")
  
```

#  {.sidebar}

### 1. Athlete Earnings

Athletes have some of the highest wages worldwide.  These earnings can vary across sports and countries.This data set shows the top 100 athlete earnings worldwide.

### 2. Flexdashboard and Plotly

This interactive uses `flexdashboard` and `plotly` to visualize the data.

# Main Tab 1

## Column {.tabset data-width="500,"}

### Column Tab 1

```{r}
d1
```

### Column Tab 2

```{r}
kable(d1)
```

### Column Tab 3

```{r}
datatable(d1, options = list(
  pageLength = 25
))
```

## Column {data-width="500"}

### Row 1

```{r}
p
```

# Main Tab 2

## Column {data-width="500"}

#### 1. Plotly for R

Plotly is an R package for creating interactive web-based graphs via plotly's JavaScript graphing library, plotly.js.

The plotly R package serializes ggplot2 figures into Plotly's universal graph JSON. plotly::ggplotly will crawl the ggplot2 figure, extract and translate all of the attributes of the ggplot2 figure into JSON (the colors, the axes, the chart type, etc), and draw the graph with plotly.js. Furthermore, you have the option of manipulating the Plotly object with the style function.

#### 2. Cutomizing the Layout

Since the ggplotly() function returns a plotly object, we can manipulate that object in the same way that we would manipulate any other plotly object. A simple and useful application of this is to specify interaction modes, like plotly.js' layout.dragmode for specifying the mode of click+drag events.

```{r}
p1
```

# main tab 3

```{r}
p2
```

## Column {data-width="500"}

# main tab 4

```{r}
p3
```

## Column {data-width="500"}